package com.hd.boot0407.dao;

import com.hd.boot0407.entity.User;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.ArrayList;
import java.util.Date;
import java.util.List;

@Mapper
public interface UserDao {
    /*查询所有数据*/
    ArrayList<User> selectAllUser();
    User getById(@Param("id")Integer id);
    User getByName(@Param("name")String name);
    int DeleteById(@Param("id")Integer id);
    int DeleteByIdArr(@Param("array")Integer[] id);
    /*主键自增长的插入User*/
    Integer addAutoIdUser(User user);
    /*作业添加用户User*/
    Integer addUser(User user);
    /*更新数据 sql*/
    Integer updateUser(User user);
    /*根据文件名查询*/
    ArrayList<User> getByFileName(@Param("FileName")String FileName);
    /*老师的*/
    List<User> getUsersByStatus();

    void updateStatusById(@Param("id") Integer id);

    List<User> getAllUsers();

    void resetStatus();
    Integer getTotalCount();

    List<User> getallByPage(@Param("startline") Integer startline,@Param("limit") Integer limit);

    List<User> getAllUsersByCondition(@Param("username") String username, @Param("sex") String sex,@Param("birthday") Date birthday);
    void batchInsert(@Param("user")ArrayList<User> users);
    public List<User> getAll();
}
